  <?php include "lib/config.php";?>
  <?php
	  
	  if(isset($_GET['id'])){
  
  $dadostemp	= $_anu->pega($_GET['id']);
  $dadoscat	= $_cat->pega($dadostemp['categoria']);
  
  $sqllista	= mysql_query("SELECT * FROM categoria_lista WHERE id = '".$dadostemp["lista"]."'");
  $rowlista	= mysql_fetch_array($sqllista);
  $n1			= $_cat->pegan1($rowlista["n1"]);
  $n2			= $_cat->pegan2($rowlista["n2"]);
  
  
  
  $clientec	= $_cli->pega($dadostemp['cliente']);
  $_cid->id		= $dadostemp["estado"];
  $estado		= $_cid->pega();
  $pegadescr	= $_des->pegapeloproduto("WHERE ativo='1' and idproduto='".$_GET['id']."'","","");
  $status		= $_anu->ExibeStatus($dadostemp["status"]);
  $dados		= $_vid->lista("WHERE anuncio = '".$_GET['id']."' ",false,false);
  $dadosativo	= $_vid->lista("WHERE anuncio = '".$_GET['id']."' and destaque = '1' ",false,false);
  $online		= $_anu->verificaOnline($dadostemp['cliente']);
  $pedidos		= $_ped->lista("WHERE id_vendedor = '".$dadostemp['cliente']."' and id_item = '".$dadostemp['id']."'   and ativo='4' ",false,false);
  
  $pedidostotais= $_ped->lista("WHERE id_vendedor = '".$dadostemp['cliente']."' and ativo='4' ",false,false);
  
	$vendidosQ = 0;
	ini_set("display_errors",0);
	foreach($pedidos as $vendidos){
	$vendidosQ = $vendidosQ+ $vendidos["quantidade"];
	}
	ini_set("display_errors",1);
  
  
	  }
	  
  ?>
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
  
  <?php include "includes/headers-conteudo.php"; ?>
  <body>
  <div id="central">
  <!--COMECAO DO TOPO-->
  <?php include "includes/header.php"; ?>
  <!--FIMZAO DO TOPO-->
  
  
  
  
  
  
  <!--FIM DIV QUE SEPARA O MENU-->
  
  
  <?php include "includes/busca.php"; ?>
  
<div style="height:3px; clear:both">&nbsp;</div>
  
  
  <!--MENU ESPACAMENTO-->
  <div style="floast:left; width:976px; padding:10px; background-color:#FAFAFA; border:1px solid #F5F5F5; margin-bottom:2px; margin-top:1px">
  <a href="#">Home</a> > <a href="categoria.php?categoria=<? echo $dadoscat["id"]; ?>"><? echo $dadoscat["titulo"]; ?></a> > <a href="categoria.php?categoria=<? echo $dadoscat["id"]; ?>&sub=<? echo $n1["id"]; ?>"><? echo $n1["titulo"]; ?></a>
  <div style="width:450px; float:right;" align="right">Solmais n&atilde;o &eacute; o vendedor deste an&uacute;ncio.</div>
  </div>
  <!--MENU ESPACAMENTO-->
  
  <div style="height:3px; clear:both">&nbsp;</div>
  
<script type="text/javascript">
function aba(abasim,abanao){

d("aba_menu_" +abasim).style.display='';
d("aba_"+abasim).className='current';

d("aba_menu_"+abanao).style.display='none';
d("aba_"+abanao).className='';

}
</script>
  

  
  <!-- MINIATURAS -->
  <div id="segura_miniaturas">
  
  
  
  <div class="simpleTabs">

<ul class="simpleTabsNavigation">
      <li><a href="javascript:void(0);" onclick="jacascript:aba(1,2);" id="aba_1" class="current">Fotos</a></li>
    <li><a onclick="jacascript:aba(2,1);" id="aba_2" href="javascript:void(0);">V&iacute;deos</a></li>
</ul>
    <div id="aba_menu_1" class="simpleTabsContent">
	
    
    

<div  class="example">
    <div class="ppy" id="ppy3">
            <ul class="ppy-imglist">
                <?php 
  $sql	= mysql_query("SELECT * FROM fotos_anuncios WHERE anuncio = '".$dadostemp["id"]."'");
  $num	= mysql_num_rows($sql);
  
  if($num == 0){
  
  echo "N&atilde;o existe fotos cadastrada";
  
  }else{
  while($rows = mysql_fetch_array($sql)){
  ?>
   <li><a href="imagens/produtos/<?php echo $rows["foto"]; ?>"><img src="/imagem.php?imagem=imagens/produtos/<?php echo $rows["foto"]; ?>&w=290&t=fill&h=290"/></a></li>
  <? }} ?>
                
                </ul>
            <div class="ppy-outer">
                <div class="ppy-stage">
                    <div class="ppy-nav">
                        <div class="nav-wrap">
                            <a class="ppy-prev" title="Previous image">Anterior</a>
                            <a class="ppy-switch-enlarge" title="Enlarge">Aumentar</a>
                            <a class="ppy-switch-compact" title="Close">Fechar</a>
                            <a class="ppy-next" title="Next image">Próximas</a>
                        </div>
                    </div>
                    <div class="ppy-counter">
                        <strong class="ppy-current"></strong> / <strong class="ppy-total"></strong> 
                    </div>
                </div>
                <div style="display:none" class="ppy-caption">
                    <span class="ppy-text"></span>
                </div>
            </div>
        </div>
        
        <h2>&nbsp;</h2>
    
</div>

    
    
    
    </div>
    
    <div id="aba_menu_2" class="simpleTabsContent" style="display:none">
	<div >
  
  <div id="videoDestaqueYou" style="margin-top:2px">
  <?php
  if(count($dados)==0){
	  ?>
	  <br />
  <br />
  
  <div align="center"><strong style="font-size:18px">Ops!? :&acute;(</strong> </div> 
   <br />
	  Que pena, este anunciante n&atilde;o adicionou v&iacute;deo!  
	 <?
  }else{
  if(count($dadosativo)==0){
	  ?>
	  Clique no v&iacute;deo abaixo para assisti-lo.
	  <?
  }else{
  foreach($dadosativo as $videosDest){ 
  if($videosDest["tipo"]=="youtube"){
  ?>	
  

<div style="margin-left:2.75px"><?php $videoexb	= $_vid->embedVideo($videosDest["url"],295,250); ?></div>
  
  <?
  }
  } 
  }}
  
  ?>
  
  </div>
  <div id="colsfoto" align="center">
  
  <?php	
  
  if(count($dados)==0){
  }else{
	  foreach($dados as $videos){ 
	  if($videos["tipo"]=="youtube"){
		  $videoexb	= $_vid->youtubeImage($videos["url"]);
		  }
	  
  ?>
	  
  <div style="border:solid 1px #CCC; width:67px; margin-left:5px; margin-top:3px; float:left">
  <img src="<?=$videoexb?>" onclick="carregaVideoDestaque('<?=$videos["url"]?>')" width="67" />
  </div>
  <? }} ?>
	  
  </div>
  
  
  
  
  </div>
    </div>
</div>



  </div>
  <!-- FIM MINIATURAS -->
  
  
  <!-- INFORMACOES DO ANUNCIO -->
  <div id="infoanuncio">
  <?php include "includes/informacoes-anuncio.php";  ?>
  </div>
  <!-- FIM INFORMACOES DO ANUNCIO -->
  
  
  
  
 
  <div style="margin-top:20px;">&nbsp;</div>
  
  <style type="text/css">
	#borderVideo {
		-moz-border-radius: 10px;  
		 border-radius: 10px;
	  }
  </style>
  
  
  
  <div style="clear:both">&nbsp;</div>
  
  <div style="width:990px; float:left;">
  <a name="pergunta"></a>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  <div id="divPDetailTab">
  <div id="divTabbedContainer" style="width:610px">
	  <div id="divTabStrip">
	  
	  	  <a name="1"></a>
	  	  <input name="hdnSelectedTabId" id="hdnSelectedTabId" value="btnReviews_Page_PDetail" type="hidden"><table id="TblTabStrip" class="TblLeftBorder" cellpadding="0" cellspacing="0"><tbody><tr><td id="tdPromosPDetail" class="selectedTabPDetail">
		  
		  <table><tbody><tr><td class="imgTabPDetail"><img title="Hidden Tab" id="imgPromosPDetail" src="images/blue_arrow_down.gif" alt="Promos" valign="middle" vspace="2" border="0" hspace="0"></td>
		  <td>
		  <input class="tdPDetailsSelectedBtnPDetail" name="btnPromosPDetail" id="btnPromosPDetail" value="Ficha t&eacute;cnica" onClick="javascript:document.getElementById('hdnSelectedTabId').value = this.id; ShowTabContent('divPromosPDetail', 'divPromosPDetail,divingredientsPDetail,divReviews_Page_PDetail,divDirectionsPDetail','http://solmais.com.br/images/blue_arrow_down.gif','http://solmais.com.br/images/white_arrow.gif', 'PDetail');" type="button">
		  
		  </td></tr></tbody></table>
		  
		  
		  </td><td id="tdImage" class="tdImage"><img title="" class="spacer" src="images/spacer.gif" alt="" vspace="0" width="6" border="0" height="15" hspace="0"></td><td id="tdingredientsPDetail" class="hiddenTabPDetail">
		  
		  <table><tbody><tr><td class="imgTabPDetail"><img title="Hidden Tab" id="imgingredientsPDetail" src="images/white_arrow.gif" alt="Hidden Tab" valign="middle" vspace="2" border="0" hspace="0"></td><td>
		  <input class="tdPDetailsBtnPDetail" name="btningredientsPDetail" id="btningredientsPDetail" value="Pergunte ao vendedor" onClick="javascript:document.getElementById('hdnSelectedTabId').value = this.id; ShowTabContent('divingredientsPDetail', 'divPromosPDetail,divingredientsPDetail,divReviews_Page_PDetail,divDirectionsPDetail','http://solmais.com.br/images/blue_arrow_down.gif','http://solmais.com.br/images/white_arrow.gif', 'PDetail');" type="button">
		  </td></tr></tbody></table></td><td id="tdImage" class="tdImage"><img title="" class="spacer" src="images/spacer.gif" alt="" vspace="0" width="6" border="0" height="15" hspace="0"></td><td id="tdReviews_Page_PDetail" class="hiddenTabPDetail"><table><tbody><tr><td class="imgTabPDetail"><img title="Hidden Tab" id="imgReviews_Page_PDetail" src="images/white_arrow.gif" alt="Hidden Tab" valign="middle" vspace="2" border="0" hspace="0"></td><td><input class="tdPDetailsBtnPDetail" name="btnReviews_Page_PDetail" id="btnReviews_Page_PDetail" value="Frete e pagamento" onClick="javascript:document.getElementById('hdnSelectedTabId').value = this.id; ShowTabContent('divReviews_Page_PDetail', 'divPromosPDetail,divingredientsPDetail,divReviews_Page_PDetail,divDirectionsPDetail','http://solmais.com.br/images/blue_arrow_down.gif','http://solmais.com.br/images/white_arrow.gif', 'PDetail');" type="button"></td></tr></tbody></table></td><td id="tdImage" class="tdImage"><img title="" class="spacer" src="images/spacer.gif" alt="" vspace="0" width="6" border="0" height="15" hspace="0"></td><td id="tdDirectionsPDetail" class="hiddenTabPDetail"><table><tbody><tr><td class="imgTabPDetail"><img title="Hidden Tab" id="imgDirectionsPDetail" src="images/white_arrow.gif" alt="Hidden Tab" valign="middle" vspace="2" border="0" hspace="0"></td><td><input class="tdPDetailsBtnPDetail" name="btnDirectionsPDetail" id="btnDirectionsPDetail" value="Perfil do anunciante" onClick="javascript:document.getElementById('hdnSelectedTabId').value = this.id; ShowTabContent('divDirectionsPDetail', 'divPromosPDetail,divingredientsPDetail,divReviews_Page_PDetail,divDirectionsPDetail','http://solmais.com.br/images/blue_arrow_down.gif','http://solmais.com.br//images/white_arrow.gif', 'PDetail');" type="button"></td></tr></tbody></table></td><td id="tdImage" class="tdImage">
		  <img title="" class="spacer" src="images/spacer.gif" alt="" vspace="0" width="6" border="0" height="15" hspace="0"></td><td id="tdtabImage" class="tdtabImage">&nbsp;</td></tr></tbody></table>
		  
	  </div>
	  
  
  <div id="divTabcontent" style="width:610px"><div id="divPromosPDetail" class="tabcontentPDetail" name="divPromosPDetail" style="display: block; visibility: visible; padding:5px; margin-left:2px">
  
  <div style="height:15px">&nbsp;</div>
  
  <span class="claro">FABRICANTE | MARCA | SELO</span>
  <br />
  
  <span class="clarinho"><?=$dadostemp["fabricante"]; ?></span>
  <?PHP if($pegadescr[1]["fabricante"] !=""){ ?>
  <br />
  <span class="clarinho"><?=$pegadescr[1]["fabricante"]; ?></span>
  <? } ?>
  
  
  <?PHP if($pegadescr[2]["fabricante"] !=""){ ?>
  <br />
  <span class="clarinho" style="color:#000099"><?=$pegadescr[2]["fabricante"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["fabricante"] !=""){ ?>
  <br />
  <span class="clarinho" style="color:#333"><?=$pegadescr[3]["fabricante"]; ?></span>
  <? } ?>
  
  
  
  <br />
  <br />
  
  <span class="claro">ANO DE FABRICA&Ccedil;&Atilde;O</span><br />
  
  <span class="clarinho"><?=$dadostemp["ano_fabricado"]; ?></span>
  
  <?PHP if($pegadescr[1]["ano"] !=""){ ?>
  <br />
  <span style="color:#009900"><?=$pegadescr[1]["ano"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[2]["ano"] !=""){ ?>
  <br />
  <span style="color:#000099"><?=$pegadescr[2]["ano"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["ano"] !=""){ ?>
  <br />
  <span style="color:#333">&gt;<?=$pegadescr[3]["ano"]; ?></span>
  <? } ?>
  
  
  <br />
  <br />
  
  <strong>COR</strong><br />
  
  <span style="color:#F00">&gt;<?=$dadostemp["cor"]; ?></span>
  <?PHP if($pegadescr[1]["cor"] !=""){ ?>
  <br />
  <span style="color:#009900">&gt;<?=$pegadescr[1]["cor"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[2]["cor"] !=""){ ?>
  <br />
  <span style="color:#000099">&gt;<?=$pegadescr[2]["cor"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["cor"] !=""){ ?>
  <br />
  <span style="color:#333">&gt;<?=$pegadescr[3]["cor"]; ?></span>
  <? } ?>
  <br />
  <br />
  
  <strong>PESO | MEDIDA</strong>
  <br />
  
  <span style="color:#F00">&gt;<?=$dadostemp["peso"]; ?></span>
  <?PHP if($pegadescr[1]["peso"] !=""){ ?>
  <br />
  <span style="color:#009900">&gt;<?=$pegadescr[1]["peso"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[2]["peso"] !=""){ ?>
  <br />
  <span style="color:#000099">&gt;<?=$pegadescr[2]["peso"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["peso"] !=""){ ?>
  <br />
  <span style="color:#333">&gt;<?=$pegadescr[3]["peso"]; ?></span>
  <? } ?>
  <br />
  <br />
  
  <strong>GARANTIA</strong>
  <br />
  
  <?PHP if($dadostemp["garantia"] !=""){ ?>
  <span style="color:#F00">&gt;<?=$dadostemp["garantia"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[1]["garantia"] !=""){ ?>
  <br />
  <span style="color:#009900">&gt;<?=$pegadescr[1]["garantia"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[2]["garantia"] !=""){ ?>
  <br />
  <span style="color:#000099">&gt;<?=$pegadescr[2]["garantia"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["garantia"] !=""){ ?>
  <br />
  <span style="color:#333">&gt;<?=$pegadescr[3]["garantia"]; ?></span>
  <? } ?>
  <br />
  <br />
  
  
  <strong>S&Eacute;RIE | MODELO | ESPECIFICA&Ccedil;&Otilde;ES</strong><br />
  
  <?PHP if($dadostemp["modelo"] !=""){ ?>
  <span style="color:#F00">&gt;<?=$dadostemp["modelo"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[1]["serie"] !=""){ ?>
  <br />
  <span style="color:#009900">&gt;<?=$pegadescr[1]["serie"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[2]["serie"] !=""){ ?>
  <br />
  <span style="color:#000099">&gt;<?=$pegadescr[2]["serie"]; ?></span>
  <? } ?>
  
  <?PHP if($pegadescr[3]["serie"] !=""){ ?>
  <br />
  <span style="color:#333">&gt;<?=$pegadescr[3]["serie"]; ?></span>
  <? } ?>
  <br />
  <br />
  
  <?PHP if(count($pegadescr)!=0){ ?>
  <strong>OBSERVA&Ccedil;&Otilde;ES</strong><br />
  <? } ?>
  <?PHP if($pegadescr[1]["observacoes"] !=""){ ?>
  
  <span style="color:#009900">&gt;<?=$pegadescr[1]["observacoes"]; ?></span>
  <br />
  <? } ?>
  
  <?PHP if($pegadescr[2]["observacoes"] !=""){ ?>
  
  <span style="color:#000099">&gt;<?=$pegadescr[2]["observacoes"]; ?></span>
  <br />
  <? } ?>
  
  <?PHP if($pegadescr[3]["observacoes"] !=""){ ?>
  <span style="color:#333">&gt;<?=$pegadescr[3]["observacoes"]; ?></span>
  <br />
  <? } ?>
  </div>
  
  
  
  <div id="divingredientsPDetail" class="tabcontentPDetail" name="divingredientsPDetail" style="display: none; visibility: hidden; padding:5px">
  <a name="pergunta"></a>
  <?PHP include "modulos/perguntas/form.php"; ?>
  </div>
  
  <div id="divReviews_Page_PDetail" class="tabcontentPDetail" name="divReviews_Page_PDetail" style="display: none; visibility: hidden;"><div id="divReviews">
   Aceitamos essas formas de pagamentos:
	  <br />
	  Frete por conta do comprador:
	  <br />            
	  <br />
  
				<img src='https://p.simg.uol.com.br/out/pagseguro/i/banners/parcelamento/468x60_pagseguro_12x.gif' alt='' />
				<br />
				<br />
  
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="468" height="60"><param name="movie" value="https://www.pagamentodigital.com.br/site/banner/campanhas/_SemJuros/05/PD_Institucional_Promocional_468x60.swf?oas=https://www.pagamentodigital.com.br&varnum=1" /><param name="quality" value="high" /><embed src="https://www.pagamentodigital.com.br/site/banner/campanhas/_SemJuros/05/PD_Institucional_Promocional_468x60.swf?oas=https://www.pagamentodigital.com.br&varnum=1" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="468" height="60"></embed></object>
  
  
  </div></div>
  
  
  <div id="divDirectionsPDetail" class="tabcontentPDetail" name="divDirectionsPDetail" style="display: none; visibility: hidden;">
  
  Aceita a proposta.
  
  </div>
  
  </div>
  </div>
  
  
  <?php
  if(count($dadosativo)==0){?>
  <div align="right">PUBLICIDADE PATROCINADA</div>
  <div style="float:right;width:370px; border:solid 1px #CCC; margin-left:6px; margin-top:8px" align="center">

  <a href="http://www.gngimports.com.br"><img src="imagens/publicidade/gng-imports.gif" border="0" /></a>
    
  </div> 
  
  
  <? }else { ?>
	<div style="background-color:#F8F8F8; float:right;width:363px; padding:3px" align="center">
    <h1 class="h1" style="padding:0px; margin:0px;">Conheça melhor a oferta</h1>
    </div> 
		  
  
		  
		   <div style="float:right; width:363px; height:auto; background:#FFF; margin-top:5px" align="center">
  
  
  <div style="background:#F8F8F8; padding:5px ; min-height:280px" id="borderVideo">
  
  <br />
  
  <?
  foreach($dadosativo as $videosDest){ 
  if($videosDest["tipo"]=="youtube"){
  $videoexb	= $_vid->embedVideo($videosDest["url"],345,265);
  }
  }
  ?>
  
  <br />
  <br />
  </div>
		</div>
  <?
  }
  ?>
  <div style="clear:both">&nbsp;</div>
			   
  <fieldset style="width:979px; float:left; margin:0px;">
  <legend style="font-weight:normal; font-size:20px; ">descri&ccedil;&atilde;o</legend>
  
  <?php echo $dadostemp["descricao"] ?>
  
  </fieldset>
  
  <div style="clear:both">&nbsp;</div>
  
  <fieldset style="width:660px; float:left; min-height:248px; margin:0px;">
  
  <legend style="font-weight:normal; font-size:20px; ">resenhas &amp; cr&iacute;ticas do item</legend>
  
  
  
  
  <div style="float:left; width:210px">
  <div style="width:95%; clear:both; margin-top:5px">
  <div style="width:75px; float:left"><a href="#">5 estrelas</a></div>
  <div style="width:75px; height:20px; float:left"><img src="images/rating_5_newr.gif" /></div>
  
  
   
  <div style="width:30px; float:left; margin-left:5px">(<?=$_res->estrelas("5",$dadostemp['id'])?>)</div>
  </div>
  
  
  <br />
  
  
  <div style="width:300px;clear:both;margin-top:5px">
  <div style="width:75px; float:left"><a href="#">4 estrelas</a></div>
  <div style="width:75px; height:20px; float:left"> 
  <div style="width:75px; height:20px; float:left"><img src="images/rating_4_newr.gif" /></div> 
  </div>
  <div style="width:30px; float:left; margin-left:5px">(<?=$_res->estrelas("4",$dadostemp['id'])?>)</div>
  </div>
  
  <br />
  
  
  <div style="width:300px;clear:both;margin-top:5px">
  <div style="width:75px; float:left"><a href="#">3 estrelas</a></div>
  <div style="width:75px; height:20px; float:left"> 
  <div style="width:75px; height:20px; float:left"><img src="images/rating_3_newr.gif" /></div> 
  </div>
  <div style="width:30px; float:left; margin-left:5px">(<?=$_res->estrelas("3",$dadostemp['id'])?>)</div>
  </div>
  
  
  
  <br />
  
  
  <div style="width:300px;clear:both;margin-top:5px">
  <div style="width:75px; float:left"><a href="#">2 estrelas</a></div>
  <div style="width:75px; height:20px; float:left"> 
  <div style="width:75px; height:20px; float:left"><img src="images/rating_2_newr.gif" /></div> 
  </div>
  <div style="width:30px; float:left; margin-left:5px">(<?=$_res->estrelas("2",$dadostemp['id'])?>)</div>
  </div>
  
  
  <br />
  
  
  <div style="width:300px;clear:both;margin-top:5px">
  <div style="width:75px; float:left"><a href="#">1 estrela</a></div>
  <div style="width:75px; height:20px; float:left"> 
  <div style="width:75px; height:20px; float:left"><img src="images/rating_1_newr.gif" /></div> 
  </div>
  <div style="width:30px; float:left; margin-left:5px">(<?=$_res->estrelas("1",$dadostemp['id'])?>)</div>
  </div>
  
  
  </div>
  <?php 
  $dadosresenha	= $_res->lista("WHERE idproduto = '".$_GET["id"]."' and ativo ='1'",false,"ORDER BY votacao DESC");
  ?>
  
  <div style="float:left; width:330px; margin-top:35px; padding:8px;" align="center">
  <strong><?=count($dadosresenha)?></strong> resenha(s) para este item. 
  ><a id="variousResenha2" href="modulos/resenhas/index.php?anuncio=<?=$dadostemp["id"]?>">Adicione uma resenha</a>
  </div>
  
  
  <div style="clear:both">&nbsp;</div>
  
  <?PHP
  $xy=0; 
  
  
  if(count($dadosresenha)==0){
  ?>
  <div style="padding:8px; margin-top:10px">Seja o primeiro a fazer uma resenha <a id="variousResenha3" href="modulos/resenhas/index.php?anuncio=<?=$dadostemp["id"]?>">aqui</a></div>
  <?
  }else{
  foreach($dadosresenha as $resenhas){
  $_res->id	= $resenhas["id"];
  $votos		= $_res->pegaVotos();
  $clienteresenha	= $_cli->pega($resenhas['idcliente']);
  $data	= converte_datetime($resenhas['data']);
  $xy%2	== '0' ? $colorbg = "#ffffff" : $colorbg = "#f8f8f8";
  ?>
  
  <div align="left" style="background-color:<?=$colorbg?>; padding:5px; margin-top:10px; width: 440px; float:left; text-align:justify">
  
  <img src="images/rating_<?=$resenhas["votacao"]?>_newr.gif" width="60" height="11" hspace="5" vspace="0" />
  
  <span style="font-size:18px;"><?=$resenhas["titulo"]?></span> 
  <br />
  <span style="margin:3px; font-weight:bold">><strong><?=$data['dia']?></strong>/<strong><?=$data['mes']?></strong>/<?=$data['ano']?> &gt;&gt; <?=$data['horario']?></span>
  <br />
  <br />
  
  <strong style="text-decoration:underline">Pontos positivos:</strong> <?=utf8_decode($resenhas["pontos_p"])?>
  <br />
  <strong style="text-decoration:underline">Pontos negativos:</strong> <?=utf8_decode($resenhas["pontos_n"])?>
  <br />
  <br />
  
  <strong><?=$clienteresenha["napresentacao"]?></strong>: 
  <?=utf8_decode($resenhas["comentario"])?>
  </div>
  
  <div style="float:left; width:135px; min-height:50px; margin-left:0px;margin-top:26px; padding:5px"><span id="result_box" lang="pt" xml:lang="pt"><span title=""> <span class="vermelho">Ajude outros a encontrarem a melhor opini&atilde;o.</span><br />
	Esta foi &uacute;til p/ voc&ecirc;?</span></span><br />
	<input name="button" type="submit" class="gh-btn" id="button" value="sim" style="padding:2px; width:30px; background-color:#999999;" onclick="javascript:votarResenha('1','<?=$resenhas["id"]?>');" />
	<input name="button2" type="submit" class="gh-btn" id="button2" style="padding:2px; width:30px; background-color:#000;" value="n&atilde;o" onclick="javascript:votarResenha('0','<?=$resenhas["id"]?>');" />
  <div style="height:5px"></div>
  
  <strong id="VotosTresenha"><?=$votos['votos']?></strong> vez(es) �til
  </div>
  
  <? $xy++; }} ?>
  
  
  
  </fieldset>
  
  <div style="float:left; width:300px; padding:0px; margin-left:11px; margin-top:11px">
  
  <script type="text/javascript"><!--
google_ad_client = "ca-pub-1290660710171643";
/* Retangulo 300x250, solmais, resenha */
google_ad_slot = "2656202721";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

  
  <!--<span style="font-weight:normal; font-size:20px; "><a name="<?=$clientec["napresentacao"]?>"></a><b>itens</b> do mesmo vendedor</span></div>
  <iframe src="modulos/anuncios/outros.php?cliente=<?=$dadostemp['cliente']?>&id=<?=$dadostemp['id']?>" frameborder="0" height="550" style="float:left; width:300px">
  
  </iframe>-->
  </div>
  
  
  </div>
  
























  
  </div>
  
  
  </div>
  
  
  </div>
  
  <!-- [example js] begin -->
<script type="text/javascript">
    <!--//<![CDATA[
    
    $(document).ready(function () {
        var options2 = {
            caption:    false,
            navigation: 'permanent',
            direction:  'left'
        }
        var options3 = {
            caption:    'permanent',
            opacity:    1
        }
    
        $('#ppy1').popeye();
        $('#ppy2').popeye(options2);
        $('#ppy3').popeye(options3);
    });
    
    //]]>-->
</script>
<!-- [example js] end -->

  
  <?php include "includes/rodape.php"; ?>
  
  
  
  
  </body>
  </html>
